/*
1. 百分制转五分制
switch选择语句ver.
*/

#include <stdio.h>

int main(){
    char level;
    int t;
    float cj;

    printf("请输入成绩：");
    scanf("%f", &cj);
    t = (int)( cj /10);

    if (cj < 0 || cj > 100) {
        level = 'W';
        printf("成绩输入错误！\n");
        return 1;
    }
    switch (t){
        case 10:
        case 9:
            level = 'A';
            break;
        case 8:
            level = 'B';
            break;
        case 7:
            level = 'C';
            break;
        case 6:
            level = 'D';
            break;
        case 5:
        case 4:
        case 3:
        case 2:
        case 1:
        case 0:
            level = 'E';
            break;

    }
    printf("%.1f对应的成绩等级为：%c\n",cj,level);
    return 0;
}
